﻿using RepositoryAndEf.Domain;
using System.Data.Entity.ModelConfiguration;

namespace RepositoryAndEf.Data.Mapping
{
    public class OrderMap : EntityTypeConfiguration<Order>
    {
        public OrderMap()
        {
            ToTable("Orders")
               .HasKey(c => c.Id)
               .HasMany<OrderItem>(c => c.Items).WithRequired();

        }
    }
}
